{% load filters %} 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Admin Template - Login</title>
<link href="/site_media/admin/styles/layout.css" rel="stylesheet" type="text/css" />
<link href="/site_media/admin/styles/login.css" rel="stylesheet" type="text/css" />
<link href="/site_media/admin/themes/blue/styles.css" rel="stylesheet" type="text/css" />

</head>
<body>
	<div id="logincontainer">
    	<div id="loginbox">
        	<div id="loginheader">
            	<img src="/site_media/admin/themes/blue/img/cp_logo_login.png" alt="Control Panel Login" />
            </div>
            
            <div id="innerlogin">
    
                	<p>用户名:</p>
                  	<input type="text" class="logininput" name="loginId" Id="loginId" />
                  	
                    <p>密码:</p>
                	<input type="password" class="logininput" name="loginPwd" Id="loginPwd"  />
                   
                   	<input type="submit" class="loginbtn" value="Submit"  onclick="return onLogin()" /><br />
                    <p><a href="#" title="Forgoteen Password?">Forgotten Password?</a></p>
              
            </div>
        </div>
        <img src="/site_media/admin/img/login_fade.png" alt="Fade" />
    </div>

<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js'></script>
<script type='text/javascript' src='/site_media/admin/artDialog/jquery.artDialog.source.js'></script>
<script type='text/javascript' src='/site_media/admin/artDialog/Plus.js'></script>
<script type='text/javascript' src='/site_media/admin/scripts/MainScript.js'></script>
<link href="/site_media/admin/artDialog/skins/black.css" rel="stylesheet" type="text/css" />
<script>

	function onLogin()
	{
		if($('#loginId').val()+"a"=="a")
		{
			$.alert('请输入账号');
				return false;
		}else if($('#loginPwd').val()+"a"=="a")
		{
			$.alert('请输入密码');
				return false;
		}else 
		{
		
		 $.AjaxServer('/AdminMain/Home/DoLogin/',{"loginId":$('#loginId').val(),"loginPwd":$('#loginPwd').val()},function(obj)
		 {
		       if(obj.IsOk)
		        {
		          this.window.location="/AdminMain/Home/Index"
		        }else
		        {
		          $.alert(obj.txt);
		        }
		 });
		
		
		}
		
	   return false;
	}
	
	
</script>
	
</body>
</html>